<?php

namespace PAT\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * PAT\UserBundle\Entity\Reduction
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="PAT\UserBundle\Entity\ReductionRepository")
 */
class Reduction
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string $type
     *
     * @ORM\Column(name="type", type="string", length=20)
     */
    private $type;
    

    /**
     * @var string $code
     *
     * @ORM\Column(name="code", type="string", length=255)
     */
    private $code;
    
    /**
     * @var boolean $type
     *
     * @ORM\Column(name="used", type="boolean")
     */
    private $used;
    
    /**
     * @var integer $value
     *
     * @ORM\Column(name="value", type="integer")
     */
    private $value;
    
    /**
     * @var boolean $type_percent
     *
     * @ORM\Column(name="type_percent", type="boolean")
     */
    private $type_percent;
    
    
    public function __construct($type,$type_percent,$value,$code){
    	$this->type = $type;
    	$this->type_percent = $type_percent;
    	$this->value = $value;
    	$this->code = $code;
    	$this->used = false;
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set type
     *
     * @param string $type
     * @return Reduction
     */
    public function setType($type)
    {
        $this->type = $type;
    
        return $this;
    }

    /**
     * Get type
     *
     * @return string 
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Set code
     *
     * @param string $code
     * @return Reduction
     */
    public function setCode($code)
    {
        $this->code = $code;
    
        return $this;
    }

    /**
     * Get code
     *
     * @return string 
     */
    public function getCode()
    {
        return $this->code;
    }



    /**
     * Set used
     *
     * @param boolean $used
     * @return Reduction
     */
    public function setUsed($used)
    {
        $this->used = $used;
    
        return $this;
    }

    /**
     * Get used
     *
     * @return boolean 
     */
    public function getUsed()
    {
        return $this->used;
    }

    /**
     * Set value
     *
     * @param integer $value
     * @return Reduction
     */
    public function setValue($value)
    {
        $this->value = $value;
    
        return $this;
    }

    /**
     * Get value
     *
     * @return integer 
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * Set type_percent
     *
     * @param boolean $typePercent
     * @return Reduction
     */
    public function setTypePercent($typePercent)
    {
        $this->type_percent = $typePercent;
    
        return $this;
    }

    /**
     * Get type_percent
     *
     * @return boolean 
     */
    public function getTypePercent()
    {
        return $this->type_percent;
    }
}